package com.jianzong.lingxuan.error;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 常用错误码
 */
@Getter
@AllArgsConstructor
public enum SysError implements IError  {

    NOT_AUTORIZED(401, "没有访问权限"),
    LOGIN_INVALID(403,"登录校验失败"),
    LOGIN_CHECK(403,"账户名或密码错误"),
    LOGIN_CHECK2(403,"账户名或密码为空"),
    LOGIN_CHECK3(403,"当前用户已被冻结"),
    TOKEN_REQUIRED(403,"Token不能为空"),
    TOKEN_UNVALID(406,"Token验证失败"),
    SYSTEM_ERROR(500, "系统错误"),
    BAD_REQUEST(400, "非法请求"),
    PARAM_UNVALID(400, "参数校验失败"),
    NAME_EXISTS(403, "昵称或用户名已存在"),
    REGISTER_INFO(400, "注册成功"),
    PARAM_NOTACTION(400, "未找到此方法");


    int code;
    String message;

}

